<!--
 * @Author: tanlijun 2060803224@qq.com
 * @Date: 2022-11-15 16:44:12
 * @LastEditors: tanlijun 2060803224@qq.com
 * @LastEditTime: 2022-11-15 16:51:43
 * @FilePath: \js基础\js基础第三天\code\打印五行五列的小星星.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>



  <script>
    //  基础版 打印5行5列
    for (let u = 1; u <= 5; u++) {
      for (let v = 1; v <= 5; v++) {
        document.write(`◇`)
      }
      document.write(`<br>`)
    }

    // 升级版 用户输入对应的行和列
    let num1 = +prompt('请输入行数：')
    let num2 = +prompt('请输入列数：')
    for (let i = 1; i <= num1; i++) {
      for (let j = 1; j <= num2; j++) {
        document.write(`◆`)
      }
      document.write(`<br>`)
    }
  </script>
</body>

</html>